#pragma once
#include <mutex>
#include "NpcItem.h"
#include "CDamageType.h"
class CGamePlayStatics
{
public:
	CGamePlayStatics();
	~CGamePlayStatics();
	static CGamePlayStatics *get_GamePlayInstance() {
		static std::once_flag instance_created;
		std::call_once(
			instance_created,
			[]() { gamePlayInstance = new CGamePlayStatics(); }
		);
		return gamePlayInstance;
	}
	/** Hurts the specified actor with generic damage.
	 * @param DamagedActor - Actor that will be damaged.
	 * @param BaseDamage - The base damage to apply.
	 * @param EventInstigator - Controller that was responsible for causing this damage (e.g. player who shot the weapon)
	 * @param DamageCauser - Actor that actually caused the damage (e.g. the grenade that exploded)
	 * @param DamageTypeClass - Class that describes the damage that was done.
	 * @return Actual damage the ended up being applied to the actor.
	 */
	static float ApplyDamage(NpcItem* DamagedActor, float BaseDamage, NpcItem* DamageCauser, CDamageType &DamageTypeClass);
private:
	static CGamePlayStatics* gamePlayInstance;
};